package com.org.constant;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 协议类型枚举
 */
public enum AgreementTypeEnum {

    DEFAULT("default","通用协议"),

    ANCHOR("anchor", "锚点协议"),

    MULTI("multi", "多协议"),

    PDF("pdf", "pdf协议"),

            ;

    private static List<Map<String, String>> agreementTypeList = new ArrayList<>();


    static {
        for(AgreementTypeEnum typeEnum : AgreementTypeEnum.values()) {
            Map<String, String> typeMap = new HashMap<>();
            typeMap.put(Params.KEY, typeEnum.getType());
            typeMap.put(Params.VALUE, typeEnum.getName());
            agreementTypeList.add(typeMap);
        }
    }

    /**
     * 协议类型
     */
    private String type;

    /**
     * 协议名称
     */
    private String name;



    AgreementTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static List<Map<String, String>> typeList() {
        return agreementTypeList;
    }
}
